
{ config, pkgs, ... }:

{
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.displayManager.gdm.wayland = true;
  services.xserver.desktopManager.gnome.enable = true;
  services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
  services.gnome.gnome-settings-daemon.enable = true;
  services.gnome.evolution-data-server.enable = true;
  services.gnome.gnome-online-accounts.enable = true;
  services.gnome.gnome-keyring.enable = true;

  programs.xwayland.enable = true;
  xdg.portal = {
    enable = true;
    # wlr.enable = true;
  };
  environment.sessionVariables = {
    XDG_SESSION_TYPE = "wayland";
    SDL_VIDEODRIVER = "wayland";
    QT_QPA_PLATFORM = "wayland";
    MOZ_ENABLE_WAYLAND = "1";
    QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
    _JAVA_AWT_WM_NONREPARENTING = "1";
  };
  environment.gnome.excludePackages = with pkgs; [
    gnome-photos
    gnome-tour
    gnome.yelp
  ]++ (with pkgs.gnome; [
    cheese # webcam tool
    gnome-music
    gnome-terminal
    gedit # text editor
    epiphany # web browser
    geary # email reader
    evince # document viewer
    gnome-characters
    totem # video player
    tali # poker game
    iagno # go game
    hitori # sudoku game
    atomix # puzzle game
  ]);

  programs.dconf.enable = true;


  environment.systemPackages = (with pkgs; [
    gthumb
    lollypop
    gnome.gnome-tweaks
    gnome.dconf-editor
    gnome.gnome-power-manager
    gnome.adwaita-icon-theme
    gnome.gnome-keyring
  ]) ++ (with pkgs.gnomeExtensions; [
    just-perfection
    custom-hot-corners-extended
    appindicator
    forge
    quick-settings-tweaker
    dash-to-dock
    clipboard-history
    espresso
    space-bar
    vitals
    ddterm
  ]);


}

